package com.gjm.demo.model;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

//保存验证码长和宽
@ConfigurationProperties(prefix = "captcha")
@Configuration
@Data
public class CaptchaProperties {

    @Value("${captcha.height}")
    private Integer height;

    @Value("${captcha.wide}")
    private Integer wide;

    private Session session = new Session();

    @ConfigurationProperties(prefix = "captcha.session")
    @Configuration
    @Data
    public class Session {
        private String captchaCode;

        private String time;
    }
}
